package com.wushijia;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
import org.springframework.web.client.RestTemplate;

/**
 * description:授权码模式
 * http://localhost:9999/oauth/authorize?response_type=code&client_id=malldemo&redirect_uri=http://www.baidu.com&scope=webmall&state=63879
 *
 * @author yang
 * @date 2018/5/17 17:46
 */
@SpringBootApplication
@EnableResourceServer
public class AuthenticationApplication {

  public static void main(String[] args) {
    SpringApplication.run(AuthenticationApplication.class, args);
  }

  @Bean
  public RestTemplate restTemplate() {
    return new RestTemplate();
  }

}
